package com.ssy.lingxi.order.model.vo.buyer.request;

import com.ssy.lingxi.order.handler.annotation.DateTimeFormatAnnotation;
import com.ssy.lingxi.order.model.vo.basic.request.OrderIdVO;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 待新增采购收货单-创建收货单请求参数
 * @author wyx
 * @version 2.0.0
 * @date 2022-01-13
 */
public class BuyerCreateReceiveVO extends OrderIdVO {
    private static final long serialVersionUID = 2250670702338662872L;
    /**
     * 订单摘要
     */
    @NotEmpty(message = "订单摘要不能为空")
    @Size(max = 60, message = "订单摘要最长60个字符")
    private String digest;

    /**
     * 单据时间
     */
    @NotBlank(message = "单据时间不能为空")
    @DateTimeFormatAnnotation
    private String orderTime;

    /**
     * 对应仓库
     */
    @Size(max = 30, message = "对应仓库最长30个字符")
    private String inventoryName;

    /**
     * 对应仓库人员
     */
    @Size(max = 12, message = "对应仓库人员最长12个字符")
    private String inventoryRole;

    /**
     * 备注
     */
    @Size(max = 100, message = "备注最长100个字符")
    private String remark;

    /**
     * 商品列表
     */
    @Valid
    @NotNull(message = "商品不能为空")
    @Size(min = 1, message = "至少有一个商品")
    private List<BuyerReceiveGoodsProductVO> detailList;

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    public String getInventoryName() {
        return inventoryName;
    }

    public void setInventoryName(String inventoryName) {
        this.inventoryName = inventoryName;
    }

    public String getInventoryRole() {
        return inventoryRole;
    }

    public void setInventoryRole(String inventoryRole) {
        this.inventoryRole = inventoryRole;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<BuyerReceiveGoodsProductVO> getDetailList() {
        return detailList;
    }

    public void setDetailList(List<BuyerReceiveGoodsProductVO> detailList) {
        this.detailList = detailList;
    }
}
